﻿
$(function () {
    prepareSopp();
    $('.s-opp').click(function () {
        toggleSopp();
    });
});

function prepareSopp() {
    var sopppos = $('.s-opp').position();
    $('.s-opp').css('left', Math.round(sopppos.left) + 'px');
    $('.s-opp').css('top', Math.round(sopppos.top) + 'px');
    $('.s-opp').css('position', 'absolute');
}
function toggleSopp() {
    if ($('.s-opp').height() == 30) {
        $('.s-opp').css('height', 'auto');
        $('.s-opp .r-grid-c').text('anuluj');
    }
    else {
        $('.s-opp').height(30);
        $('.s-opp .r-grid-c').text('zmień')
    }
}
